import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { ModalC } from '../../../comps';
import 'moment/locale/zh-cn';
@connect(({ tenantManageM, loading }) => ({
  tenantManageM,
  loading,
}))
export default class instModal extends PureComponent {
  render() {
    const { saveVisible, titleModal, cancel, saveModal, confirmRevise } = this.props;
    return (
      <ModalC
        title={titleModal}
        visible={saveVisible}
        onOk={confirmRevise}
        onCancel={cancel}
        width={750}
        okButtonProps={{ type: 'primary' }}
        confirmLoading={
          titleModal == '新增租户管理员' ? this.props.loading.effects['tenantManageM/saveTable'] == true : this.props.loading.effects['tenantManageM/sysUpdate'] == true
        }
      >
        <div>{saveModal()}</div>
      </ModalC>
    );
  }
}
